<?php

declare (strict_types=1);

namespace App\Model;

use Hyperf\DbConnection\Model\Model;

/**
 * 回合动作组
 * Class RoundActionGroupModel
 * @package App\Model
 */
class RoundActionGroupModel extends Model
{

    protected $table = 'rounds_action_group';

    protected $guarded = [];

    protected $casts = [
        'actions' => 'array',
    ];

    /**
     * 房间
     * @return \Hyperf\Database\Model\Relations\BelongsTo
     */
    public function Room()
    {
        return $this->belongsTo(RoomsModel::class, 'rooms_id');
    }

    /**
     * 回合
     * @return \Hyperf\Database\Model\Relations\BelongsTo
     */
    public function Round()
    {
        return $this->belongsTo(RoundsModel::class, 'rounds_id');
    }
}